<template>
    <div>
    </div>
</template>

<script setup lang="ts">
import { useVueCesium } from 'vue-cesium'
import type { VcViewerProvider, VcReadyObject } from 'vue-cesium/es/utils/types'
import { CircleWaveMaterialProperty } from "./CircleWaveMaterialProperty";
import { CircleWave } from "./CircleWave";

const $vc: VcViewerProvider = useVueCesium()

$vc.creatingPromise.then((readyObj: VcReadyObject) => {
    let Cesium = readyObj.Cesium
    let viewer = readyObj.viewer

    // 水波纹材质
    CircleWaveMaterialProperty(Cesium)
    // 水波纹特效
    let CircleWaveObj = CircleWave(Cesium, viewer)

    // 水波纹扩散
    let positions = [[106.17, 38.50, 0], [106.26, 38.51, 0]]
    positions.map((item, index) => {
        let circleWave = new CircleWaveObj(viewer, "cirCleWave" + index);
        circleWave.add(item, '#1FA8E3', 500, 3000);
    })

})

</script>